package com.yang.controller;


import com.yang.domain.dto.Result;
import com.yang.domain.entity.ShopType;
import com.yang.service.IShopTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yang
 * @since 2022-10-22
 */
@RestController
@RequestMapping("/shop-type")
@Api(tags = "店铺类型模块")
public class ShopTypeController {
    @Resource
    private IShopTypeService typeService;

    /**
     * 查询所有的店铺类型
     * @return 店铺类型集合
     */
    @GetMapping("list")
    @ApiOperation(value = "查看店铺列表")
    public Result queryTypeList() {
        List<ShopType> shopTypes = typeService.queryTypeList();
        return Result.ok(shopTypes);
    }
}
